In many path-based automatic positioning applications, such as computer numerically controlled (CNC) machining, the controller's commanded path-generation algorithms need to satisfy many user desires simultaneously. First, they must follow the desired path within a certain required positional accuracy. Second, where possible, they must follow this path at a programmed vector tool speed, or “feedrate” (the rate at which the material is fed into the tool, or at which the tool is moved through the material). Third, algorithms must keep the path traversal within the physical capabilities of the machine, usually expressed as limits on the higher time derivatives of motor position, particularly acceleration. Finally, in many systems, the operator must be given an interactive “feedrate override” capability to be able to adjust the speed manually and instantaneously without changing the part program. Typically this is done with a knob that sets the override as a percentage of the programmed feedrate, for the purpose of diagnosing machining problems at the prototype phase, in order to optimally program a system for production.
One problem with existing systems is that most implementations of acceleration and override control have significant adverse effects on the accuracy with which the generated commanded path matches the desired path description. This is particularly true of the traditional CNC methods. These effects were often tolerable at standard machining speeds and accuracies of the day, but become unacceptable at higher speeds and/or higher accuracy requirements. Many other techniques that mitigate these effects produce other undesirable effects, such as delays in responding to override changes.
Traditional CNC path generation algorithms create equations of commanded motion with respect to time for each programmed move “block” at the specified feedrate, constant through the programmed move. This leads to constant axis velocities for linearly interpolated moves, and sinusoidal axis velocities for circularly interpolated moves, in Cartesian systems.
These equations of motion for each axis are then solved every interpolation cycle (usually at the servo update rate) with an update of the time value to generate a series of commanded positions along the path at the commanded feedrate. (“Servo update” may also be described as a “position update”.) Step changes in axis velocities are possible (and common) at move boundaries.
In the traditional CNC method, acceleration control is applied after interpolation with a causal (i.e., not using future information) low-pass filter. In an early CNC controller, this was implemented by applying a large time constant (e.g. several hundred milliseconds) in the analog velocity loop of the servo drives. In current existing systems it is more commonly implemented with a dynamically equivalent digital low-pass filter, usually first-order, acting on the numeric data streams for each axis coming out of the interpolator algorithm.
FIG. 1 shows a graph 100 of the resulting position-versus-time 102 and velocity-versus-time 104 profiles for a simple constant-speed move passed through a digital filter with a 100-msec time constant, in a prior art system.
For a first-order low-pass filter with a time-constant Tf, the steady-state path error for a path with radius R executed at velocity V is:Ef=V2Tf2/2R
At now-common speeds and time constants, the resulting errors can be significant. This effect is largely responsible for the machining lore that circles get smaller at high speeds. It is noteworthy that these are errors in the commanded path, and can occur well within the servo system's bandwidth; tracking errors of the servo loop as the bandwidth is exceeded can yield further errors.
FIG. 2 shows a graph 200 of the commanded path of two runs of a shape composed of lines and arcs, in a prior art system. The first run 202 is executed without any acceleration control, and so produces the desired path precisely (although in a physically unrealizable manner). It produces the sharp corners and the outer arc paths in the graph. The second run 204 repeats the profile, but with a digital low-pass filter with Tf=100 msec applied after the interpolation. This is a very large time constant for the speed and size in order to produce easily seen effects. The corners are rounded significantly (and asymmetrically) so they can be passed without slowing, and the arcs fail significantly to the inside due to the filtering.
Another prior art method of acceleration control is applied during the calculation of the commanded move equations, before interpolation. In a coordinated multi-axis application such as path-control machining, a common acceleration time must be used for all axes, even if the time is derived from a maximum rate of acceleration on one of the axes. FIG. 3 shows a graph 300 of the position-versus-time 302 and velocity-versus-time 304 profiles for the same basic move as in FIG. 1, but with a constant acceleration of 100-msec time (yielding the same maximum acceleration as in FIG. 1) applied before interpolation.
FIG. 4 shows a graph 400 of the same programmed path as in FIG. 2, with the first run 402 again going without acceleration control, but with the second run 404 utilizing a 100 msec acceleration time between moves applied before interpolation in a non-causal algorithm (using information about the subsequent trajectory). This method has the same peak accelerations as the method of FIG. 2, but the effect on path fidelity is much smaller. The corner rounding is much smaller, and the arcs do not fail to the inside. This method requires significantly more complex acceleration-calculation algorithms, particularly when applied to circular interpolation, but it does create superior path generation.
While the second method looks significantly superior, is it has some important disadvantages. First, it produces some undesirable effects when interactive feedrate override is used, as explained below. Second, it is more difficult in this method to apply acceleration control when the acceleration or deceleration must be applied over multiple programmed moves, such as when the moves are very small in complex contouring applications.
As explained above, interpolation in command-position generation involves repeated solutions of the move equations for each axis as the time value is incremented each interpolation cycle. Normally, the numerical increment of the time value matches the actual physical time elapsed. But with feedrate or speed override control, the numerical increment can deviate from the real time. For example, if 50% override is desired, the increment value used corresponds to half of the true time elapsed. Note that the physical time increment is not changed in this process, just the number used in the equations.
It is apparent what happens to constant-velocity moves in this process—the velocity varies linearly with the override value. However, if there are already acceleration profiles in the move equations, the acceleration also varies, and as the square of the override value.
FIG. 5 shows a graph 500 illustrating the effect of override when acceleration control is applied after interpolation, and therefore after override control. The same move is executed at 100% and 50% override, with the same acceleration time constant applied to both. The position-versus-time profile at the 100% override setting is indicated by line 502; the 50% override setting is indicated by line 504. Velocity-versus-time at 100% is indicated by line 506; velocity-versus-time at 50% is indicated by line 508. The acceleration time constant is unchanged with override, so the rate of acceleration varies linearly with override. If the acceleration time constant is set to provide maximum acceleration at 100% override, the acceleration limits will be exceeded at override values greater than 100% and reduced acceleration rates will be used at override values less than 100%. In addition, the commanded path on any curve will vary with the override value.
FIG. 6 shows a graph 600 illustrating the effect of override when acceleration control is applied before interpolation, and therefore before override control. The same move is executed at 100% and 50% override values, with the same acceleration time pre-calculated for both. The position-versus-time profile at the 100% override setting is indicated by line 602; the 50% override setting is indicated by line 604. Velocity-versus-time at 100% is indicated by line 606; velocity-versus-time at 50% is indicated by line 608.
The acceleration time varies inversely with override, and since velocity varies linearly with override, the rate of acceleration varies with the square of the override. (At 50% override, the acceleration to and from half the velocity takes twice as long, so the acceleration is only one-quarter of what it would be at 100% override.) This leads to substantially sub-optimum performance at low override values, and can lead to significant acceleration limit violations at override values greater than 100%, with the acceleration varying more widely with override than with the post-interpolation acceleration filter. However, because of this fact, when this style of acceleration control is used to blend path moves together at corners, the size and shape of the corners does not change with override values, a feature that many users value. Nonetheless, important disadvantages remain.
The present invention overcomes the limitations of the prior art by providing a system and method for generating a controlled motion path with a machine-tool system having a controller operating at a servo rate. The method includes a first (coarse) interpolation step, in which a path segment corresponding to a number of servo updates is calculated. At this first interpolation step, a speed override factor is established. After establishing the speed override factor, acceleration control can be applied to the segmented trajectory. Next, a second (fine) interpolation step occurs, which calculates every individual set point for each axis along the commanded path, usually incrementing at the servo update period. The number of servo update periods per path segment may vary over the path.